<?php 
session_start();
session_destroy();

$userid = $_GET['id'];
$date_now = date("Y-m-d H:m:s",time());
include('connect-db.php');

$sql_script = "INSERT INTO usershisto(UserId,activity,DateTime) VALUES($userid,2,'".$date_now."')";
$result = mysql_query($sql_script)	or die(mysql_error()); 

header("location:main_login.php");
?>